home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / April 96 / Re Scrolling Content < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.0 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Scrolling Content
  2. Sent:        4/2/96 5:35 PM
  3. Received:    4/2/96 4:51 PM
  4. From:        Laurent Delamare, laurentd@apple.com
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >I need to programmaticly scroll my content view to display another part of
  9. >my content, properly updating the scroll bars.
  10. >
  11. >What's the best way to do this?
  12. >
  13.  
  14. Try this:
  15.  
  16.   // create a point with the vertical or horizontal scrolling distance
  17.   // (one of the 2 must be null, we scroll in 1 direction at a time)
  18.  
  19.   FW_CPoint delta(dx, dy);
  20.  
  21.   // Tell your scrollbar-scroller object to scroll the content view
  22.  
  23.   scroller->ScrollRelative(ev, delta);
  24.  
  25.   // Adjust your scrollbars
  26.  
  27.   scroller->UpdateScrollParameters(ev, false);
  28.  
  29.  
  30.  
  31. ______________________________________________________________________
  32. Laurent Delamare               laurentd@apple.com
  33. ODF Team                       http://www.devtools.apple.com/odf/
  34. Apple Computer, Inc.           http://www.opendoc.apple.com/
  35.  
  36.